package com.twu.biblioteca;

public class Customer {

    String name;
    String email;
    String phoneNo;

    String libraryNumber;
    String password;

    public Customer(String name, String email, String phoneNo, String libraryNumber, String password) {
        this.name = name;
        this.email = email;
        this.phoneNo = phoneNo;

        this.libraryNumber = libraryNumber;
        this.password = password;
    }


    public String toString() {
        StringBuilder outputString = new StringBuilder();

        outputString.append(this.name);
        outputString.append("\n");

        outputString.append(this.email);
        outputString.append("\n");

        outputString.append(this.phoneNo);

        return outputString.toString();
    }

    public boolean validateCredentials(String libraryNumber, String password) {
        if(this.libraryNumber.equals(libraryNumber) && this.password.equals(password))
            return true;
        return false;
    }
}